<?=form_open_multipart(uri_string())?>
<table class="form">
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('full_name');?></td>
        <td><?=$rs->lb_full_name;?></td>
    </tr>
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('nick_name');?></td>
        <td><?=$rs->lb_user_login;?></td>
    </tr>
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('email');?></td>
        <td><?=$rs->lb_email;?></td>
    </tr>
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('password');?></td>
        <td><?//=$rs->lb_password;?></td>
    </tr>
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('gender');?></td>
        <td><?php echo ($rs->nb_gender==1)? lang('male') : lang('female')?></td>
    </tr>
    <tr>
        <td class="required label" style="width: 150px;"><?=lang('bidthday');?></td>
        <td><?=$rs->lb_phone;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('phone');?></td>
        <td><?=$rs->lb_phone;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('address');?></td>
        <td><?=$rs->lb_address;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('website');?></td>
        <td><?=$rs->lb_website;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('yahoo');?></td>
        <td><?=$rs->lb_yahoo;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('skype');?></td>
        <td><?=$rs->lb_skype;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('msn');?></td>
        <td><?=$rs->lb_msn;?></td>
    </tr>
    <tr>
        <td class="label" style="width: 150px;"><?=lang('gmt');?></td>
        <td><?=$rs->timezoneoffset?></td>
    </tr>
    <tr>
        <td class="label"><?=lang('image');?></td>
        <td><img width="135px" height="135px" alt="avatar" id="avatar_img" src="<?php echo base_url_site()."uploads/avatar/135/".($rs->lb_image!=''?$rs->lb_image:'default_avatar.jpg');?>"/></td>
    </tr>
    <tr>
        <td class="label">&nbsp;</td>
        <td></td>
    </tr>
    <tr>
        <td class="label"><?=lang('mailorther');?></td>
        <td><?php if($rs->bl_mail_orther==1) echo 'ok'; ?></td>
    </tr>
    <tr>
        <td class="label"><?=lang('mailadmin');?></td>
        <td><?php if($rs->bl_mail_admin==1) echo 'ok'; ?></td>
    </tr>
    <tr>
        <td class="label"><?=lang('active_deactive');?></td>
        <td><?php if($rs->bl_active==1) echo 'ok'; ?></td>
    </tr>
    <tr>
        <td class="label"><?=lang('dtcreate');?></td>
        <td><?=date('d/m/Y H:i', strtotime($rs->dt_create))?></td>
    </tr>
    <tr>
        <td class="label"><?=lang('lastlogin');?></td>
        <td><?=$rs->dt_last_login;?></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><!--<input type="submit" name="bt_submit" value="" class="capnhat">--></td>
    </tr>
</table>
<?=form_close()?>
<script type="text/javascript" language="javascript">
        $(document).ready(function(){
        new AjaxUpload($('#upload_avatar'),{
            action:'<?php echo base_url();?>user/settings_upload_avatar',
            name: 'uploadfile',
            data: {
                member_id:$("#member_id").val(),
                lb_image:$('#lb_image').val()
            },onSubmit: function(file, ext){
                 if (! (ext && /^(jpg|png|jpeg|gif|)$/.test(ext))){
                    // extension is not allowed
                    $('#status_message').text('Allow JPG, PNG, JPEG, GIF');
                    return false;
                }
                $('#status_message').text('Uploading. Please wait ...');
            },onComplete: function(file, response){
                //On completion clear the status
                $('#status_message').text('');
                //Add uploaded file to list
                if(response!="error")
				{
					var data = $.parseJSON(response) ;
					//$("#avatar").html('<img src="' + site + 'uploads/100/' + data.img + '" width="100" height="100" />') ;
                    document.getElementById('avatar_img').src = '<?php echo base_url_site();?>uploads/avatar/135/'+data.img;
					$("#lb_image").val(data.img) ;

                }else{

                }
            }
        });
    });

</script> 
